//
//  RankListCell.m
//  edu
//
//  Created by baobaodp on 13-8-27.
//  Copyright (c) 2013年 baobaodp. All rights reserved.
//

#import "RankListCell.h"
#import "DBbase.h"
#import "Record.h"

@implementation RankListCell

@synthesize stuName;
@synthesize score;
@synthesize rank;
@synthesize imgView;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void) setData:(Record *) record index: (int) rowIndex
{
    self.score.text = [record getFieldValueByName:@"R_Souce"];
    self.stuName.text = [record getFieldValueByName:@"stu_Name"];
    self.rank.text = [record getFieldValueByName:@"rank"];

    UIImage *img=[UIImage imageWithData:[record getFieldDataByName:@"stu_Img"]];
    if(img != nil){
        self.imgView.image =img;
    }
    

}

@end
